const prefix = '/users'

function getUserInfo(Joi) {
  return {
    method: 'get',
    path: '/info',
    async handler(ctx, next) {
      ctx.body = ctx.state.user.data
    }
  }
}

module.exports = {
  prefix,
  getUserInfo
}